﻿@model Web.Models.LogOnModel

@{
    ViewBag.Title = "Log On";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>



@using (Html.BeginForm("LogOn", "Account", FormMethod.Post, new { @class = "form-inline" }))
{
    <div style="width: 600px; margin-top:40px; margin-left: auto; margin-right: auto;">
        <h2>Log On</h2>
        <fieldset>
            <legend>Account Information</legend>

            <div>
                @Html.LabelFor(m => m.UserName)
            </div>

            <div class="control-group">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <div>
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="control-group">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="inline-label">
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe)
            </div>

            <p>
                <input type="submit" class="btn btn-primary" value="Log On" />
            </p>

            @if (!ViewData.ModelState.IsValid)
            {
                <div class="alert alert-error">
                    <a class="close" data-dismiss="alert">×</a>
                    <strong>The username or password you entered is incorrect.</strong>
                </div>
            }

        </fieldset>
        <br/>
        <p class="help-block">
            Please enter your user name and password.
        </p>
    </div>
}
